<template>
  <el-menu :default-active="$route.path" class="el-menu-demo" mode="horizontal">
    <el-menu-item v-for="item in menuItems" :key="item.path" :index="item.path">
      <router-link :to="item.path">{{ item.label }}</router-link>
    </el-menu-item>
  </el-menu>
</template>

<script>
export default {
  data() {
    return {
      menuItems: [
        { path: '/', label: '首页' },
        { path: '/calculator', label: '复利计算器' },
        // 添加更多菜单项...
      ],
    };
  },
};
</script>

<style scoped>
/* 自定义样式（可选） */
</style>